package com.java46.struts2.base.entity;

import javax.persistence.*;
import java.util.Objects;

/**
 * @ClassName TAdminEntity
 * @Description 管理员信息
 * @Author zuxia
 * @Date 2018/7/17 14:38
 * @Vcrsion 1.0
 **/
@Entity
@Table(name = "t_admin", schema = "fullboydb", catalog = "")
public class TAdminEntity {
    private int adminId;
    private String adminName;
    private String adminPwd;

    @Id
    @Column(name = "adminId")
    public int getAdminId() {
        return adminId;
    }

    public void setAdminId(int adminId) {
        this.adminId = adminId;
    }

    @Basic
    @Column(name = "adminName")
    public String getAdminName() {
        return adminName;
    }

    public void setAdminName(String adminName) {
        this.adminName = adminName;
    }

    @Basic
    @Column(name = "adminPwd")
    public String getAdminPwd() {
        return adminPwd;
    }

    public void setAdminPwd(String adminPwd) {
        this.adminPwd = adminPwd;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TAdminEntity that = (TAdminEntity) o;
        return adminId == that.adminId &&
                Objects.equals(adminName, that.adminName) &&
                Objects.equals(adminPwd, that.adminPwd);
    }

    @Override
    public int hashCode() {

        return Objects.hash(adminId, adminName, adminPwd);
    }
}
